<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Mocks::BaseExpectation</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Mocks::BaseExpectation</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor\plugins\rspec/lib/spec/mocks/message_expectation_rb.html">
                vendor\plugins\rspec/lib/spec/mocks/message_expectation.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000160">and_raise</a>&nbsp;&nbsp;
      <a href="#M000159">and_return</a>&nbsp;&nbsp;
      <a href="#M000161">and_throw</a>&nbsp;&nbsp;
      <a href="#M000162">and_yield</a>&nbsp;&nbsp;
      <a href="#M000158">expected_args</a>&nbsp;&nbsp;
      <a href="#M000164">invoke</a>&nbsp;&nbsp;
      <a href="#M000167">invoke_consecutive_return_block</a>&nbsp;&nbsp;
      <a href="#M000165">invoke_method_block</a>&nbsp;&nbsp;
      <a href="#M000168">invoke_return_block</a>&nbsp;&nbsp;
      <a href="#M000166">invoke_with_yield</a>&nbsp;&nbsp;
      <a href="#M000163">matches</a>&nbsp;&nbsp;
      <a href="#M000157">new</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">sym</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000157" class="method-detail">
        <a name="M000157"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000157.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000157.html');return false;">
          <span class="method-name">new</span><span class="method-args">(error_generator, expectation_ordering, expected_from, sym, method_block, expected_received_count=1, opts={})</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000160" class="method-detail">
        <a name="M000160"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000160.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000160.html');return false;">
          <span class="method-name">and_raise()<br />
and_raise(Exception) #any exception class<br />
and_raise(exception) #any exception object<br />
</span>
          </a>
        </div>
      
        <div class="method-description">
          <h2>Warning</h2>
<p>
When you pass an exception class, the <a
href="MessageExpectation.html">MessageExpectation</a> will raise an
instance of it, creating it with <tt><a
href="BaseExpectation.html#M000157">new</a></tt>. If the exception class
initializer requires any parameters, you must pass in an instance and not
the class.
</p>
        </div>
      </div>

      <div id="method-M000159" class="method-detail">
        <a name="M000159"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000159.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000159.html');return false;">
          <span class="method-name">and_return</span><span class="method-args">(*values, &amp;return_block)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000161" class="method-detail">
        <a name="M000161"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000161.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000161.html');return false;">
          <span class="method-name">and_throw</span><span class="method-args">(symbol)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000162" class="method-detail">
        <a name="M000162"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000162.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000162.html');return false;">
          <span class="method-name">and_yield</span><span class="method-args">(*args)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000158" class="method-detail">
        <a name="M000158"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000158.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000158.html');return false;">
          <span class="method-name">expected_args</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000164" class="method-detail">
        <a name="M000164"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000164.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000164.html');return false;">
          <span class="method-name">invoke</span><span class="method-args">(args, block)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000163" class="method-detail">
        <a name="M000163"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000163.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000163.html');return false;">
          <span class="method-name">matches</span><span class="method-args">(sym, args)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000167" class="method-detail">
        <a name="M000167"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000167.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000167.html');return false;">
          <span class="method-name">invoke_consecutive_return_block</span><span class="method-args">(args, block)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000165" class="method-detail">
        <a name="M000165"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000165.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000165.html');return false;">
          <span class="method-name">invoke_method_block</span><span class="method-args">(args)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000168" class="method-detail">
        <a name="M000168"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000168.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000168.html');return false;">
          <span class="method-name">invoke_return_block</span><span class="method-args">(args, block)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000166" class="method-detail">
        <a name="M000166"></a>

        <div class="method-heading">
          <a href="BaseExpectation.src/M000166.html" target="Code" class="method-signature"
            onclick="popupCode('BaseExpectation.src/M000166.html');return false;">
          <span class="method-name">invoke_with_yield</span><span class="method-args">(block)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>